package com.projManage.service.service.base;

import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;
import com.liferay.portal.kernel.annotation.BeanReference;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.util.PortalUtil;

import com.projManage.service.model.projManagedb;
import com.projManage.service.service.persistence.projManagedbPersistence;
import com.projManage.service.service.projManagedbLocalService;
import com.projManage.service.service.projManagedbService;

import java.util.List;


public abstract class projManagedbLocalServiceBaseImpl
    implements projManagedbLocalService {
    @BeanReference(name = "com.projManage.service.service.projManagedbLocalService.impl")
    protected projManagedbLocalService projManagedbLocalService;
    @BeanReference(name = "com.projManage.service.service.projManagedbService.impl")
    protected projManagedbService projManagedbService;
    @BeanReference(name = "com.projManage.service.service.persistence.projManagedbPersistence.impl")
    protected projManagedbPersistence projManagedbPersistence;

    public projManagedb addprojManagedb(projManagedb projManagedb)
        throws SystemException {
        projManagedb.setNew(true);

        return projManagedbPersistence.update(projManagedb, false);
    }

    public projManagedb createprojManagedb(long id) {
        return projManagedbPersistence.create(id);
    }

    public void deleteprojManagedb(long id)
        throws PortalException, SystemException {
        projManagedbPersistence.remove(id);
    }

    public void deleteprojManagedb(projManagedb projManagedb)
        throws SystemException {
        projManagedbPersistence.remove(projManagedb);
    }

    public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return projManagedbPersistence.findWithDynamicQuery(dynamicQuery);
    }

    public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
        int end) throws SystemException {
        return projManagedbPersistence.findWithDynamicQuery(dynamicQuery,
            start, end);
    }

    public projManagedb getprojManagedb(long id)
        throws PortalException, SystemException {
        return projManagedbPersistence.findByPrimaryKey(id);
    }

    public List<projManagedb> getprojManagedbs(int start, int end)
        throws SystemException {
        return projManagedbPersistence.findAll(start, end);
    }

    public int getprojManagedbsCount() throws SystemException {
        return projManagedbPersistence.countAll();
    }

    public projManagedb updateprojManagedb(projManagedb projManagedb)
        throws SystemException {
        projManagedb.setNew(false);

        return projManagedbPersistence.update(projManagedb, true);
    }

    public projManagedb updateprojManagedb(projManagedb projManagedb,
        boolean merge) throws SystemException {
        projManagedb.setNew(false);

        return projManagedbPersistence.update(projManagedb, merge);
    }

    public projManagedbLocalService getprojManagedbLocalService() {
        return projManagedbLocalService;
    }

    public void setprojManagedbLocalService(
        projManagedbLocalService projManagedbLocalService) {
        this.projManagedbLocalService = projManagedbLocalService;
    }

    public projManagedbService getprojManagedbService() {
        return projManagedbService;
    }

    public void setprojManagedbService(projManagedbService projManagedbService) {
        this.projManagedbService = projManagedbService;
    }

    public projManagedbPersistence getprojManagedbPersistence() {
        return projManagedbPersistence;
    }

    public void setprojManagedbPersistence(
        projManagedbPersistence projManagedbPersistence) {
        this.projManagedbPersistence = projManagedbPersistence;
    }

    protected void runSQL(String sql) throws SystemException {
        try {
            PortalUtil.runSQL(sql);
        } catch (Exception e) {
            throw new SystemException(e);
        }
    }
}
